package com.liugh.service.zhongche;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.liugh.base.BusinessException;
import com.liugh.entity.User;
import com.liugh.entity.standard.StandardApprove;
import org.csource.common.MyException;

import java.io.IOException;
import java.net.URISyntaxException;

/**
 * Created by Fatao on 2018/10/30 .
 */
public interface IStandardApproveService extends IService<StandardApprove> {
    int cancelApprove(int id);

    StandardApprove disagreeApprove(StandardApprove standardApprove) throws BusinessException;

    StandardApprove getApproveById(int id);

    Page<StandardApprove> getMyApprove(Page<StandardApprove> page,String userNo);

    StandardApprove updateApprove(StandardApprove standardApprove);

    Page<StandardApprove> getAgreeApprove(User user, Page<StandardApprove> page);

    void handleApprove(StandardApprove approve) throws IOException, MyException, BusinessException, URISyntaxException, Exception;

    void synUpdateItem(int approveId, int status);

    StandardApprove addApprove(StandardApprove standardApprove,User user);

    Page<StandardApprove> getAllApprove(Page<StandardApprove> page);

    /**
     * 通过ID获取User
     * @param id
     * @return
     */
    User getUserByAppId(int id);
}
